package com.kuang.dao;

import com.kuang.pojo.Books;
import com.kuang.pojo.Borrows;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface BookMapper {
    //增加一本书
    int addBook(Books books);
    //删除一本书
    int deleteBookById(@Param("bookId") int id);
    //更新一本书
    int updateBook(Books books);
    //查询一本书
    Books queryBookById(@Param("bookId") int id);
    //查询全部的书籍
    List<Books> queryAllBook();
    //书数量
    int updateBookNumber(@Param("borrowNumber") int borrowNumber,@Param("bookNo") String bookNo);

    int updateBookNumber2(@Param("borrowId") int id);


    List<Books> querBookByNo(@Param("bookNo") String bookNo);


    int updateBookById2(Borrows borrows);
}
